//package com.example.s20241022;
//
//import lombok.extern.slf4j.Slf4j;
//import org.aspectj.lang.ProceedingJoinPoint;
//import org.aspectj.lang.annotation.*;
//import org.springframework.stereotype.Component;
//
//@Slf4j
//@Aspect
//@Component
//public class AspectDemo {
//
////    @Pointcut("execution(* com.example.s20241022.*.*(..))")
////    public void aop(){}
//    //前置通知
//    @Before("execution(* com.example.s20241022.*.*(..))")
//    public void doBefore() {
//        log.info("执⾏ Before ⽅法");
//    }
//    //后置通知
//    @After("execution(* com.example.s20241022.*.*(..))")
//    public void doAfter() {
//        log.info("执⾏ After ⽅法");
//    }
//    //返回后通知
//    @AfterReturning("execution(* com.example.s20241022.*.*(..))")
//    public void doAfterReturning() {
//        log.info("执⾏ AfterReturning ⽅法");
//    }
//    //抛出异常后通知
//    @AfterThrowing("execution(* com.example.s20241022.*.*(..))")
//    public void doAfterThrowing() {
//        log.info("执⾏ doAfterThrowing ⽅法");
//    }
//    //添加环绕通知
//    @Around("execution(* com.example.s20241022.*.*(..))")
//    public Object doAround(ProceedingJoinPoint joinPoint) throws Throwable {
//        log.info("Around ⽅法开始执⾏");
//        Object result = joinPoint.proceed();
//        log.info("Around ⽅法结束执⾏");
//        return result;
//    }
//
//}
